#include<stdio.h>

float add_number(float* arr,int n){
	float sum=0;
	int h=0;
	for(h=0;h<n;h++){
	sum+=*arr;
	arr++;
	}
	return sum;
}
int main()
{
	float arry[10000]={0};
	int i=0;
	printf("enter 'q' to quit.\n");
	while(1)
	{
		if((scanf("%f",&arry[i]))==0)
		   break;
		i++;
	}
	float ret=add_number(arry,i);
	printf("%f   %f",ret,ret/i);
	
}